package com.iz0000.exp.ssmeh.controller;

import com.iz0000.exp.ssmeh.LockableQueue;
import com.iz0000.exp.ssmeh.bean.User;
import com.iz0000.exp.ssmeh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @Auther: guoxl
 * @Date: 2019/4/7 20:28
 * @Description:
 */
@Controller
// @RequestMapping("/user")
public class UserController {

    @Autowired
    protected UserService userService;

    @RequestMapping("/")
    @ResponseBody
    public List<User> queryAllUser() throws Exception {
        List<User> users = userService.queryAllUsers();
        return users;
    }



}
